/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.bht.esa.weather.remotebeaninterfaces;

import de.bht.esa.weather.model.geo.GeoCoordinates;
import java.io.Serializable;

/**
 * Repräsentiert einen Request, welcher durch den ResourceManager in die Queue zur Aggregation gesendet wird.
 * Enthält entweder die von Benutzer eingegebenen Koordinaten oder den Ort für den der Wetterbericht angefragt werden soll.
 * 
 * @author Andreas Goese
 * @author Sven Höche
 */
public class WeatherAggregationRequest implements Serializable{
    private static final long serialVersionUID = 1234567891281330010L;
    private String locationQuery;
    private GeoCoordinates coordinates;
    private String resourceId;
    
    public WeatherAggregationRequest(GeoCoordinates coordinates) {
        this.coordinates = coordinates;
    }

    public WeatherAggregationRequest(String locationQuery) {
        this.locationQuery = locationQuery;
    }

    public String getLocationQuery() {
        return locationQuery;
    } 

    public GeoCoordinates getCoordinates() {
        return coordinates;
    }

    public String getResourceId() {
        return resourceId;
    }

    public void setResourceId(String resourceId) {
        this.resourceId = resourceId;
    }

    @Override
    public String toString() {
        String val = "["+this.getClass().getName()+":";
        
        if(this.resourceId != null){
            val += " resourceId: " + this.resourceId;
        }
        
        if(this.locationQuery != null){
            val += " locationQuery: " + this.locationQuery;
        }
                
        if(this.coordinates != null){
            val += " coordinates: " + this.coordinates;
        }

        val += "]";
        return val;
    }
 
}
